package wlpc;

import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.ServerSocket;
import java.net.Socket;

public class server {
    //与client是一起的
    public static void main(String[] args) throws IOException {
        ServerSocket ss = new ServerSocket(10000);

        //监听客户的连接
        Socket accept = ss.accept();

        InputStream is = accept.getInputStream();
        //如果传入的是中文的话
//        InputStreamReader isr = new InputStreamReader(is);
//        isr.read();
        int b;
        while((b=is.read())!=-1){
            System.out.print((char)b);
        }
        






        accept.close();
        ss.close();
    }
}
